<?php // no direct access
defined('_JEXEC') or die('Restricted access');

// Link a photogallery
global $mainframe;
$item = $mainframe -> getMenu() -> getItem('97');

// Includo libreria per crop
jimport('effetticollaterali.utils.images.helper');

foreach($imagesArray as $valueImages){
	$title = $valueImages->title;
	if(strlen($title) > 8) {
		$title = substr($title, 0, 5) . "...";
	}
	
	// Path per crop thumb
	$img_crop = ECImagesHelper :: getCropImage('/'.$valueImages->linkthumbnailpath, 58, 48);
	
	?>
	<p>
		<a class="<?php echo $button->methodname ?>" title="<?php echo $valueImages->title ?>" href="<?php echo JRoute::_($valueImages->link) ?>" rel="<?php echo $button->options ?>">
			<img src="<?php echo $img_crop ?>" alt="<?php echo $valueImages->title ?>"/>
		</a>
		<a class="<?php echo $button->methodname ?>" title="<?php echo $valueImages->title ?>" href="<?php echo JRoute::_($valueImages->link) ?>" rel="<?php echo $button->options ?>">
			<?php echo JHTML::_('date', $valueImages -> date, JText::_('DATE_FORMAT_LC4')) ?><br/>
			<strong title="<?php echo $valueImages->title ?>"><?php echo $title ?></strong>
		</a>
	</p> 
	<?php
}
?>

<h3><a href="<?php echo JRoute :: _ ($item -> link . "&Itemid=97") ?>">vai alla photogallery</a></h3>
